﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Presentation.ServiceAgent.MembershipServiceAgent;

namespace Presentation.ServiceAgent.MembershipService
{


    /// <summary>
    /// Contract for Membership service client 
    /// </summary>
    public interface IMemberShipServiceClient
    {


        /// <summary>
        /// Crreate a User and associated member 
        /// </summary>
        ///<param name="username">User's name</param>
        ///<param name="password"> membership password</param>
        ///<param name="email">Email address</param>
        ///<param name="passwordQuestion"> secrete question used to retrieve password</param>
        ///<param name="passwordAnswer">Answer of password question </param>
        ///<param name="isApproved">is user approuved </param>
        ///<param name="providerUserKey">here use Guid for userID </param>
        /// <returns>membership user created</returns>
        /// <exception cref="System.Exception">Thrown when failed to create </exception>
        Membership CreateUser(Membership newMember);


        /// <summary>
        /// Validate a user  with a specified user name and password
        /// </summary>
        ///<param name="username">user name </param>
        ///<param name="password">user password </param>
        /// <returns>true if success false else where</returns>
        bool ValidateUser(string username, string password);

        /// <summary>
        /// Retrieve a specifique user 
        /// </summary>
        ///<param name="username">user name </param>
        ///<param name="userIsOnline">user is onine </param>
        /// <returns>user as membership</returns>
        Membership GetUser(string username, bool userIsOnline);

        /// <summary>
        /// Delete a specifique user 
        /// </summary>
        ///<param name="username">user name </param>
        ///<param name="deleteAllRelatedData"> delete associated date to the specifique user </param>
        /// <returns>true if succes false else where</returns>
        bool DeleteUser(string username, bool deleteAllRelatedData);
    }
}
